<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/5/6 0006
  Time: 16:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- Footer Top Section Start -->
<div class="footer-top-section section">
    <div class="container">
        <div class="footer-widget-wrap row">

            <!-- Footer Widget Start -->
            <div class="col-lg-3 col-sm-6 col-12">
                <div class="footer-widget">
                    <div class="footer-widget-about">
                        <img src="<%=path%>/assets/images/logo/logo-light.png" alt="">
                        <p>Lorem ipsum dolor sit amet consecte tur adipisicing elit. Maiores officiis quod quo id inventore quis.</p>

                        <ul class="footer-socail">
                            <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                            <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                            <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                            <li><a href="#"><i class="fa fa-pinterest-p"></i></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- Footer Widget End -->

            <!-- Footer Widget Start -->
            <div class="col-lg-3 col-sm-6 col-12">
                <div class="footer-widget">
                    <h6 class="title">Quick links</h6>
                    <div class="footer-widget-link">
                        <ul>
                            <li><a href="#">Post New Job</a></li>
                            <li><a href="#">Jobs List</a></li>
                            <li><a href="#">Candidate List</a></li>
                            <li><a href="#">Employer List</a></li>
                            <li><a href="#">Browse Categories</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- Footer Widget End -->

            <!-- Footer Widget Start -->
            <div class="col-lg-3 col-sm-6 col-12">
                <div class="footer-widget">
                    <h6 class="title">Tranding Jobs</h6>
                    <div class="footer-widget-link">
                        <ul>
                            <li><a href="#">Designer</a></li>
                            <li><a href="#">UI & UX Expert</a></li>
                            <li><a href="#">Develpoer</a></li>
                            <li><a href="#">iOS developer</a></li>
                            <li><a href="#">Front-End developer</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- Footer Widget End -->

            <!-- Footer Widget Start -->
            <div class="col-lg-3 col-sm-6 col-12">
                <div class="footer-widget">
                    <h6 class="title">Newsletter</h6>
                    <div class="footer-widget-newsletter">
                        <p>Subscribe to Lawson to get all latest Job, Resume, Company Listing & Blog post to stay update.</p>
                        <form id="mc-form" class="mc-form">
                            <input id="mc-email" autocomplete="off" type="email" placeholder="Enter your e-mail address">
                            <button id="mc-submit" class="btn"><i class="fa fa-envelope-o"></i></button>
                        </form>
                        <!-- mailchimp-alerts Start -->
                        <div class="mailchimp-alerts text-centre">
                            <div class="mailchimp-submitting"></div><!-- mailchimp-submitting end -->
                            <div class="mailchimp-success text-success"></div><!-- mailchimp-success end -->
                            <div class="mailchimp-error text-danger"></div><!-- mailchimp-error end -->
                        </div><!-- mailchimp-alerts end -->
                    </div>
                </div>
            </div>
            <!-- Footer Widget End -->

        </div>
    </div>
</div>
<!-- Footer Top Section End -->

<!-- Footer Bottom Section Start -->
<div class="footer-bottom-section section">
    <div class="container">
        <div class="row">

            <!-- Footer Copyright Start -->
            <div class="col-12">
                <p class="footer-copyright text-center">Copyright &copy; 2019.Company name All rights reserved.</p>
            </div>
            <!-- Footer Copyright End -->

        </div>
    </div>
</div>
<!-- Footer Bottom Section End -->
<%--///////////////////////////////--%>
<!-- JS
============================================ -->
<!-- Google Map API JS -->
<script src='https://ditu.google.cn/maps/api/js?key=AIzaSyC3nDHy1dARR-Pa_2jjPCjvsOR4bcILYsM'></script>

<!-- Vendors JS -->
<script src="<%=path%>/assets/js/vendor/modernizr-3.6.0.min.js"></script>
<script src="<%=path%>/assets/js/vendor/jquery-3.4.1.min.js"></script>
<script src="<%=path%>/assets/js/vendor/bootstrap.bundle.min.js"></script>

<!-- Plugins JS -->
<script src="<%=path%>/assets/js/plugins/slick.min.js"></script>
<script src="<%=path%>/assets/js/plugins/jquery.waypoints.min.js"></script>
<script src="<%=path%>/assets/js/plugins/jquery.counterup.min.js"></script>
<script src="<%=path%>/assets/js/plugins/jquery.parallax.js"></script>
<script src="<%=path%>/assets/js/plugins/jquery.ajaxchimp.min.js"></script>
<script src="<%=path%>/assets/js/plugins/ion.rangeSlider.min.js"></script>
<script src="<%=path%>/assets/js/plugins/jquery.scrollUp.min.js"></script>

<!-- Main Activation JS -->

<script src="<%=path%>/assets/js/main.js"></script>
<script type="text/javascript" src="<%=path%>/assets/js/vendor/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="<%=path%>/assets/js/vendor/signUpCheck.js.jsp"></script>


</body>

</html>
<script type="text/javascript">
    $(function () {
        if(${msg eq 'notLogin'}){
            alert("请先登录");
        }
        <c:if test="${'activation' eq param.msg}">
        alert("请前往邮箱验证激活");
        </c:if>
        <c:if test="${requestScope.err!=null}">
        confirm("${requestScope.err}")
        </c:if>
    });
    $("#sub").click(function () {
        //alert($("#yanZheng").text())
        if("验证成功"!=$("#yanZheng").text()){
            confirm("请滑动滑块验证！")
            return false;
        }
    });

</script>
<script>
    window.addEventListener('load',function(){
        //code是后台传入的验证字符串
        var code = "jsaidaisd656",
            codeFn = new moveCode(code);
        //获取当前的code值
        //console.log(codeFn.getCode());
        //改变code值
        //code = '46asd546as5';
        //codeFn.setCode(code);
        //重置为初始状态
        //codeFn.resetCode();
    });

</script>
<script>
    //获取元素距离页面边缘的距离
    function getOffset(box,direction){

        var setDirection =  (direction == 'top') ? 'offsetTop' : 'offsetLeft' ;

        var offset =  box[setDirection];

        var parentBox = box.offsetParent;
        while(parentBox){

            offset+=parentBox[setDirection];
            parentBox = parentBox.offsetParent;
        }
        parentBox = null;

        return parseInt(offset);
    }

    function moveCode(code){

        var fn = {codeVluae : code};

        var box = document.querySelector("#code-box"),
            progress = box.querySelector("p"),
            codeInput = box.querySelector('.code-input'),
            evenBox = box.querySelector("span");

        //默认事件
        var boxEven = ['mousedown','mousemove','mouseup'];
        //改变手机端与pc事件类型
        if(typeof document.ontouchstart == 'object'){

            boxEven = ['touchstart','touchmove','touchend'];
        }

        var goX,offsetLeft,deviation,evenWidth,endX;

        function moveFn(e){

            e.preventDefault();
            e = (boxEven['0'] == 'touchstart') ? e.touches[0] : e || window.event;


            endX = e.clientX - goX;
            endX = (endX > 0) ? (endX > evenWidth) ? evenWidth : endX : 0;

            if(endX > evenWidth * 0.7){

                progress.innerText = '松开验证';
                progress.style.backgroundColor = "#66CC66";
            }else{

                progress.innerText = '';
                progress.style.backgroundColor = "#FFFF99";
            }

            progress.style.width = endX+deviation+'px';
            evenBox.style.left = endX+'px';
        }

        function removeFn() {

            document.removeEventListener(boxEven['2'],removeFn,false);
            document.removeEventListener(boxEven['1'],moveFn,false);

            if(endX > evenWidth * 0.7){

                progress.innerText = '验证成功';
                progress.style.width = evenWidth+deviation+'px';
                evenBox.style.left = evenWidth+'px'

                codeInput.value = fn.codeVluae;
                evenBox.onmousedown = null;
            }else{

                progress.style.width = '0px';
                evenBox.style.left = '0px';
            }
        }

        evenBox.addEventListener(boxEven['0'], function(e) {

            e = (boxEven['0'] == 'touchstart') ? e.touches[0] : e || window.event;

            goX = e.clientX,
                offsetLeft = getOffset(box,'left'),
                deviation = this.clientWidth,
                evenWidth = box.clientWidth - deviation,
                endX;

            document.addEventListener(boxEven['1'],moveFn,false);

            document.addEventListener(boxEven['2'],removeFn,false);
        },false);

        fn.setCode = function(code){

            if(code)
                fn.codeVluae = code;
        }

        fn.getCode = function(){

            return fn.codeVluae;
        }

        fn.resetCode = function(){

            evenBox.removeAttribute('style');
            progress.removeAttribute('style');
            codeInput.value = '';
        };

        return fn;
    }
</script>